//
//  PlaceTacticsTableViewCell.m
//  Trip
//
//  Created by dlios on 15-7-14.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "PlaceTacticsTableViewCell.h"

@implementation PlaceTacticsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.image1 = [[UIImageView alloc] init];
        [self.contentView addSubview:_image1];
        [_image1 release];
        self.image2 = [[UIButton alloc] init];
//        self.image2.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:_image2];
        [_image2 release];
        self.image3 = [[UIButton alloc] init];
//        self.image3.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_image3];
        [_image3 release];
        self.image4 = [[UIButton alloc] init];
//        self.image4.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_image4];
        [_image4 release];
        
        
        self.label1 = [[UILabel alloc] init];
//        self.label1.backgroundColor = [UIColor greenColor];
        [self.image1 addSubview:_label1];
        [_label1 release];
        self.label2 = [[UILabel alloc] init];
//        self.label2.backgroundColor = [UIColor greenColor];
        [self.image1 addSubview:_label2];
        [_label2 release];
        self.label3 = [[UIButton alloc] init];
//        self.label3.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_label3];
        [_label3 release];
        self.label4 = [[UIButton alloc] init];
//        self.label4.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_label4];
        [_label4 release];
        self.label5 = [[UIButton alloc] init];
//        self.label5.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_label5];
        [_label5 release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.image1.frame = CGRectMake(5, 5, self.frame.size.width - 10, 190);
    self.image2.frame = CGRectMake(self.frame.size.width / 4, 205, self.frame.size.width / 10, self.frame.size.width / 10);
//    self.image3.frame = CGRectMake(self.frame.size.width / 8 + self.frame.size.width / 4 + self.frame.size.width / 16, 205 + self.frame.size.width / 16, self.frame.size.width / 8, self.frame.size.width / 8);
    self.image4.frame = CGRectMake(self.frame.size.width / 2 + self.frame.size.width / 8, 205, self.frame.size.width / 10, self.frame.size.width / 10);
    
    self.label1.frame = CGRectMake(5, 5, self.frame.size.width / 2, 20);
    self.label2.frame = CGRectMake(5, 30, self.frame.size.width / 2, 15);
    self.label3.frame = CGRectMake(self.frame.size.width / 4, 205 + self.frame.size.width / 8, self.frame.size.width / 10, 20);
//    self.label4.frame = CGRectMake(self.frame.size.width / 16 * 2 + self.frame.size.width / 4, 205 + self.frame.size.width / 4, self.frame.size.width / 4, 20);
    self.label5.frame = CGRectMake(self.frame.size.width / 2 + self.frame.size.width / 16 + self.frame.size.width / 64, 205 + self.frame.size.width / 8, self.frame.size.width / 6, 20);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
